﻿@using Abp.Web.Security.AntiForgery
@using KelonProud.Configuration.Ui
@using KelonProud.Web.Views.Home.Components.SideBarNavMenu
@inject IAbpAntiForgeryManager AbpAntiForgeryManager
@{
    Layout = null;
    AbpAntiForgeryManager.SetCookie(Context);
}
@model string

<!DOCTYPE html>

<html>
<head>
    @*<meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="renderer" content="webkit">
        <meta http-equiv="Cache-Control" content="no-siteapp" />*@


    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <title>便民服务管理系统</title>
    <link href="~/lib/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
    <link href="~/fonts/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <link href="//at.alicdn.com/t/font_856871_2t8iqsfkg4s.css" rel="stylesheet" />
    <link href="~/lib/layer/theme/default/layer.css" rel="stylesheet" asp-append-version="true" />
    <link href="~/css/layout-nav.css" rel="stylesheet" />
    <link href="~/css/layout-content.css" rel="stylesheet" />
    @*<link href="~/css/_all-skins.css" rel="stylesheet" />*@
    <link href="~/css/all-skins1.css" rel="stylesheet" />

    <style>
        html {
            overflow: hidden;
        }

        #content-main {
            height: calc(100% - 42px);
            overflow: hidden;
        }


        @@media(max-width: 768px) {
            #content-main {
                width: calc(100% + 30px);
                height: 100%;
            }

            body {
                overflow: hidden;
            }
        }

        .messages-menu .header .label-mail-count, .notifications-menu .header .label-notification-count {
            color: #dd4b39;
        }
    </style>
</head>
<body class="hold-transition @UiThemes.UiThemeValue(ThemeUi) sidebar-mini ">

    <div class="wrapper " id="bodyDiv">

        <header class="main-header">
            <!-- Logo -->
            <a href="#" class="logo">
                <!-- mini logo for sidebar mini 50x50 pixels -->
                <span class="logo-mini"><b>便</b></span>
                <!-- logo for regular state and mobile devices -->
                <span class="logo-lg"><b>便民服务</b>管理系统</span>
            </a>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top">
                <!-- Sidebar toggle button-->

                <div class="navbar-sidebar-menu">
                    <ul class="nav navbar-nav">
                        <li>
                            <a href="#" class="menu-toggle" data-toggle="push-menu" role="button">
                                <i class="iconfont icon-zuoduiqi"></i>
                            </a>
                        </li>
                        <li>
                            <a href="#" class="page-refresh" role="button">
                                <i class="iconfont icon-shuaxin"></i>
                            </a>
                        </li>
                        <li>
                            @*   <form action="@Url.Action("IndexNew","Home")" method="get" class="sidebar-form">*@
                            <input type="text" id="searchStr" name="searchStr" value="@Model" class="search-input form-control" autocomplete="off" placeholder="模块名称/编号...">
                            @*</form>*@
                        </li>
                    </ul>
                </div>


                <div class="navbar-custom-menu">
                    <ul class="nav navbar-nav">
                        <!-- Messages: style can be found in dropdown.less-->
                        <li class="dropdown messages-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-envelope-o"></i>
                                <span class="label label-success label-mail-count">0</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="header">您有<span class="label-mail-count">0</span>条未读信息</li>
                                <li>
                                    <!-- inner menu: contains the actual data -->
                                    <ul class="menu" id="mailTableMenu">
                                        @*<li>
                                                <!-- start message -->
                                                <a href="#">
                                                    <div class="pull-left">
                                                        <img src="~/images/user6-128x128.jpg" class="img-circle" alt="User Image" />
                                                    </div>
                                                    <h4>
                                                        Support Team
                                                        <small><i class="fa fa-clock-o"></i> 5 mins</small>
                                                    </h4>
                                                    <p>Why not buy a new awesome theme?</p>
                                                </a>
                                                <!-- end message -->
                                            </li>
                                        *@
                                    </ul>
                                </li>
                                <li class="footer"><a href="#" id="btnCheckAllMail">查看所有信息</a></li>
                            </ul>
                        </li>
                        <!-- Notifications: style can be found in dropdown.less -->
                        <li class="dropdown notifications-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-bell-o"></i>
                                <span class="label label-warning label-notification-count">0</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="header">您有<span class="label-notification-count">0 </span>条未读通知</li>
                                <li>
                                    <!-- inner menu: contains the actual data -->
                                    <ul class="menu" id="notificationTableMenu">
                                        @*<li>
                                            <a href="#">
                                                <i class="fa fa-users text-aqua"></i> 5 new members joined today
                                            </a>
                                        </li>
                                        <li>
                                            <a href="#">
                                                <i class="fa fa-warning text-yellow"></i> Very long description here that may not fit into the
                                                page and may cause design problems
                                            </a>
                                        </li>
                                        <li>
                                            <a href="#">
                                                <i class="fa fa-users text-red"></i> 5 new members joined
                                            </a>
                                        </li>
                                        <li>
                                            <a href="#">
                                                <i class="fa fa-shopping-cart text-green"></i> 25 sales made
                                            </a>
                                        </li>
                                        <li>
                                            <a href="#">
                                                <i class="fa fa-user text-red"></i> You changed your username
                                            </a>
                                        </li>*@
                                    </ul>
                                </li>
                                <li class="footer"><a href="#">查看所有通知</a></li>
                            </ul>
                        </li>
                        <!-- Tasks: style can be found in dropdown.less -->
                        <li class="dropdown tasks-menu" id="fullscreenToggle" data-state="">
                            <a href="#"><i class="iconfont icon-quanping"></i></a>
                        </li>
                        <!-- User Account: style can be found in dropdown.less -->
                        <li class="dropdown user user-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <img src="~/images/user.png" class="user-image" alt="User Image">
                                <span class="hidden-xs">@UserInfo.Name</span>
                            </a>
                            <ul class="dropdown-menu">
                                <!-- User image -->
                                <li class="user-header">
                                      <img src="~/images/user.png" class="img-circle" alt="User Image">

                                    <p>
                                        <small>最后登录于 @UserInfo.LastLoginTime?.ToString("yyyy-MM-dd HH:mm:ss")</small>
                                    </p>
                                </li>
                                <!-- Menu Body -->
                                <!-- Menu Footer-->
                                <li class="user-footer">
                                    <div class="pull-left">
                                        <a href="#" class="btn btn-info btn-flat" id="btnModifyPwd"><i class="fa fa-info"></i> 修改密码</a>
                                    </div>
                                    <div class="pull-right">
                                        <a href="#" class="btn btn-danger btn-flat" id="btnLogOut"><i class="fa fa-sign-out"></i> 退出登录</a>
                                    </div>
                                </li>
                            </ul>
                        </li>
                        <!-- Control Sidebar Toggle Button -->
                        <li>
                            <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>

        <div class="main-sidebar">
            <div class="sidebar">
                @await Component.InvokeAsync(typeof(SideBarNavMenuViewComponent), new { searchStr = Model })
            </div>
            <!-- /.sidebar -->
        </div>

        <div class="content-wrapper">
            <div class="row content-tabs">
                <button class="roll-nav roll-left push-left">
                    <i class="fa fa-backward"></i>
                </button>
                <nav class="page-tabs roll-menu-tabs">
                    <ul class=" page-tabs-content">
                        @* <a href="javascript:;" class="active roll-menu-tab" data-id="index_v1.html">首页</a>*@
                    </ul>
                </nav>
                <button class="roll-nav roll-right push-right">
                    <i class="fa fa-forward"></i>
                </button>
                <div class="btn-group roll-nav roll-right ">
                    <button class="dropdown tab-close" data-toggle="dropdown">
                        选项操作<span class="caret"></span>

                    </button>
                    <ul role="menu" class="dropdown-menu dropdown-menu-right">
                        <li class="tab-showActive">
                            <a><i class="fa fa-refresh"></i> 刷新当前选项卡</a>
                        </li>
                        <li class="divider"></li>
                        <li class="tab-closeAll">
                            <a><i class="fa fa-times"></i> 关闭全部选项卡</a>
                        </li>
                        <li class="tab-closeOther">
                            <a style="padding-left: 18px;"><i class="iconfont icon-nav_all-close_btn_ic"></i> 关闭其他选项卡</a>
                        </li>
                    </ul>
                </div>
                @*<a href="login.html" class="roll-nav roll-right tab-exit"><i class="fa fa fa-sign-out"></i> 退出</a>*@
            </div>

            <div class="row tab-mainContent" id="content-main">
                @* <iframe class="tab-iframe" name="iframe0" width="100%" height="100%" src="index_v148b2.html?v=4.0" frameborder="0" data-id="index_v1.html" seamless></iframe>*@
            </div>
        </div>

        @*<footer class="main-footer">
                <div class="pull-right hidden-xs">
                    <b>Version</b> 2.4.0
                </div>
                <strong>Copyright &copy; 2014-2016 <a href="https://adminlte.io">Almsaeed Studio</a>.</strong> All rights
                reserved.
            </footer>*@

        <aside class="control-sidebar control-sidebar-dark">
            <!-- Create the tabs -->
            <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
                <li class="active"><a href="#control-sidebar-skin-tab" data-toggle="tab"><i class="iconfont icon-theme"></i> 主题</a></li>
                <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="iconfont icon-renwu1"></i> 通知</a></li>
                <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="iconfont icon-gerenshezhi"> </i> 设置</a></li>
            </ul>
            <!-- Tab panes -->
            <div class="tab-content">
                <div class="tab-pane active" id="control-sidebar-skin-tab">
                    <ul class="z-setTheme-color">
                        @foreach (var theme in UiThemes.All)
                        {
                            var currentCss = theme.Name == ThemeUi ? "skin-this" : "";


                            <li data-name="@theme.Name" data-css="@theme.CssClass" class="@theme.CssClass @currentCss">
                                <div class="z-setTheme-header"></div>
                                <div class="z-setTheme-side">
                                    <div class="z-setTheme-logo">
                                    </div>
                                </div>
                            </li>
                        }
                    </ul>
                </div>
                <!-- Home tab content -->
                <div class="tab-pane" id="control-sidebar-home-tab">
                </div>
                <!-- /.tab-pane -->
                <!-- Settings tab content -->
                <div class="tab-pane" id="control-sidebar-settings-tab">
                </div>
                <!-- /.tab-pane -->
            </div>
        </aside>
    </div>


    <script src="~/lib/jquery/dist/jquery.js" asp-append-version="true"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.js" ></script>
    <script src="~/lib/abp-web-resources/Abp/Framework/scripts/abp.js" asp-append-version="true"></script>
    <script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.jquery.js" asp-append-version="true"></script>
    <script src="~/lib/layer/layer.js" asp-append-version="true"></script>
    <script src="~/lib/slimscroll/jquery.slimscroll.min.js" asp-append-version="true"></script>
    <script src="~/js/main.js" asp-append-version="true"s></script>
    <script src="~/js/adminlte.js" ></script>
    <script src="~/js/contabs.js" asp-append-version="true"></script>
    <script src="~/view-resources/Views/Home/Index.js" asp-append-version="true"></script>
    <script src="~/js/modalWindow.js" asp-append-version="true"></script>

    <script>
        $(function() {
            $(".sidebar-menu li").not(".treeview").click(function() {
                var code = $(this).find("a").data("code");
                var text = $(this).text();
                var href = $(this).find("a").attr("href");

                $.ajax({
                    url: "/api/services/admin/navigation/requestModule?code=" + code,
                    type: "post",
                    success: function(data) {
                        if (data) {
                            addTabs(text, href);
                        } else {

                            layer.alert('您没有该模块权限',
                                {
                                    icon: 2,
                                    skin: 'layer-ext-moon'
                                });
                        }
                    },
                    error: function(jqXHR) {
                        if (jqXHR.responseJSON.Error.Details ==="登录失效") {
                            window.location.href = "@Url.Action("Login", "Account")";

                        }
                    }
                    });


                return false;
            });

            var homeLi = $(".sidebar-menu li.active");
                addTabs(homeLi.text(), homeLi.find("a").attr("href"), false);
        });

        $("#btnModifyPwd").click(function () {
            DiyWindow.modal({
                id: "modifyPwd",
                title: '修改密码',
                width: 500,
                height: 370,
                showMaxBtn: false,
                url: '@Url.Action("ModifyPwd", "User")'
            });
        });
    </script>
</body>
</html>
